Make 'load directory' multi platform