Sanitize directory path. Delete trailing "/" if present

Fixes https://github.com/mdb/lob/issues/1