hashcopy: added directory support