Added support for special characters such as spaces in file names.