core: Fix cross-platform file loading

Signed-off-by: Robin Hallabro <robin.hallabro@sveabyran.se>