fix another issue with osx case-insensitivity
fix breaking test
to() can now be passed a map that will expand the given url e.g aUrl/{foo} or aUrl?foo={foo}. Fixes #1