added support for hard-linking files instead of copying them on posix systems