Fix error message for invalid characters in path statements.