Added an os-independent function in the controller to get the absolute path to any folder or resource