Use cp -R instead of cp -a (it's more portable).