Minor refactoring of RuntimeUtil
Added toContainerFile() and another test