Stop packagePath variable from being undefined

Ghost currently fails at trying to load apps. This change addresses that issue by doing that scoping thing that you need to do occasionally when working with, like, embedded functions.