Fix a few issues with URL handling

This should fix a couple issues with URL handling. One being that urls can have numbers and dashes but those were being rejected. The other fix should cover data URLs and resolve issue #18.