list based file/dir constructors
add as_foreign method to dir and file