fix #82 path configuration for ghostscript for pdf preview
handle file over mimetype, only set animated to true when output file is gif, fix filename encoding
cleaned code
Merge branch 'hotfix/82'