Check for various errors that could create malformed paths.