Fix make rule for source tarballs
More Makefile fancyness
Add target to generate a binary tarball
Make .gitignore rules capture all tarballs
Factor copy_attributes out of perform_link in action.c

This makes the code more modular and understandable. Also, fix a bug where
attributes were actually assigned in case of hardlinks.