fixed errors with whitespaces in filenames. tests failed after fix for #512