fix false return value. getScriptPath of directory should not return false.
Redirect to proper URI for directory, ie. must end with '/'