Довольно интуитивный способ сделать это:
import shutil, os
def remove_folder_contents(path):
shutil.rmtree(path)
os.makedirs(path)
remove_folder_contents('/path/to/folder')
If any one is interested, I solved this by building my own module which was heavily based on the Magento_Contacts
module.
Here are some links that helped me figure things out.
http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table