Merge pull request #4 from crazyserver/wip-MDL-35434_m2

Dynamic filearea, filename taken from original file and some more corrections
Refactored for other themes.
tidy up and mime type.
Fixed negative item id issue.
Sorted draft files issue at expense of not showing current filename.