Typo that prevented ending slash from being removed when user specifies custom directory -d