However i figured out what was wrong. I only had 'application_path' defined for the artifact. If i defined 'path' on the artifact, then APPLICATION_PATH gets that value in before_deploy.ps1. But then in deploy.ps1 it gets set to the actual 'application_path'.
It all seems a little weird but at least its working now.