Add trailing slash if there's no trailing slash & security fix.. 

- The user should not have to worry about this, and it's common convention not to use a trailing slash when specifying directory names.
- Fix problem with dir traversal when using %2e instead of '.' Fixes: #57 (hopefully)