Update backup.sh

Fixes bugs with arrays