Work correctly with filenames containing spaces