Validating paths and directories.