cleaned up cleanUrl method
throw exception on invalid path in constructor