Fixed trailing slash issue. Closes #2.