Fixed issue with spaces in filenames and added tests
Merge branch 'filename_fix'

Fixed filename space issue and prepared tests