path and downloader bugfixes

- get correct extension when submission was imgur gallery
- skip visited links
- fix issues with overlapping files
- avoid html_parser issue with non-ascii characters