Stripping basePath from route url, only adding it when appropriate. Fixes #38 and #20.

Fixes #38 and #20.