Replace the current list of checks with a is_valid_path function.
Whitespace.
Disallow any backslashes.