added the apps_dir parameter, and re-added the (removed) functionality.