Make the resources directory independent.

If not launched from project directory the application crashes, this patch fixes this problem making it launchable
from wherever you want.