Set the application's directory as a global so we can use it in the core controller.
Moved base controller from skeleton to core.