Added check for list-resources()' directory path to end with '/'.