fix for automatic renaming
fix getFiletype function
small fix in getFilename function
fix problem with 'Suppressing alert boxes leads to NS_ERROR_NOT_AVAILABLE'

Mozilla bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=633154
and see zotfile thread in zotero forum
improve rename attachment function