A minor portability fix for Solaris.

Some older systems don't have a -a flag for cp. The -a flag also has
slightly different effects on different system, but I have replaced it
with -RpP which does appear to have a consistent effect across
different systems and works the same as -a for this particular use.