encode filenames properly and don't depend on files/fixtures for testing