Refs #296 - Ensure that the method returns a directory path

Ensure that the method returns a directory path and not a file path.

Requires that the path have a trailing slash to indicate that it is a
directory. Not really sure how to avoid this?