swap() function

source:
http://www.csc.uvic.ca/~sae/seng265/fall04/tips/s265s047-tips/bash-swap-two-files.html