Escape files

Fixes issues with filenames containing special characters; while the code _could_ use some cleaning-up (i.e., not adding the quotes around the filename so that they don't have to later be removed), this should be a functional and viable solution.