Proper filepath resolution