add $app_dir var to point to application root

This is about the same as the %BASE_DIR% var in the windows
scripts
rename BASE_DIR to APP_DIR
Merge pull request #555 from jrobeson/add-app_dir-var

add app_dir var to point to root of application