Added support for Windows paths and validation of file extensions