Minor improvement in checking for whitespace in URIs