core: Fix cross-platform file loading

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

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