Escaped spaces in filename arguments

Added quotes around file name variables to prevent them from being expanded into multiple arguments if they contain spaces.