Adapted directory.php to work with the latest version of BeeHub
directory.php changed