fix copy-packages
Merge pull request #327 from stuartf/issue-314

fix copy-packages