manageSnapshots.sh: bug if many arguments are used

Fixes a bug that occures when the script is called with more than 9
arguments