Reformat

switched file.exists and dir.exists in parsing user file path input to
make sure file is caught in statement first rather than directory