fix word matches in transform_ipynb_uri

`\w` is never the right pattern, use `[\w-]`. It's possible that it should be even more liberal.

Also add a redirect for GitHub tree urls, and fixes the OrderedDict that wasn't actually ordered because it was created from a regular un-ordered dict.

closes #271