Fix bug where directory-list left the trailing slash of directory names
Add the offending expression to the exception message