Be more forgiving when validating URLs. Fixes #141.