Modules-1294 Fix Auth_Require bug with directories

#854