Fix problem with relative paths to resources.

Only OS X is fixed, Linux and Windows needs a solution.
Merge branch 'hotfix' into develop