added some xtra stuff for creating nice filenames from files without a -path