add new 'app_subdir' variable to correctly handle assets etc. if app is in a subdirectory

Fixes #615.