Fix copy() breakage when specifying relative paths