fix trailing slash problem. closes #34