Relativize file path when resource path is set