Better URL checking. Resolves #4.