add trailing slash to path if needed. Fixes #40