APPDIR replaced with OPENSHIFT_GEAR_DIR
Minor changes