changes setup.sh

  - adds optional parameter for creating copies

  - fixes compability issues with FreeBSD /bin/sh