Add check for file existence when parsing paths

Prevents an ELOOP error when trying to call fs.statSync on a broken symbolic link or a non-existent file that is part of the file tree being parsed.