Fix empty repo check for Mac OS X

The code that checks if the repo is empty is not interpreted correctly by Mac OS X bash. $n_packs is left-padded with spaces so incorrectly passes the '== 0' check, and the construct '[test] || (do something then exit)' does not exit the script. 

OS X version 10.9 Mavericks
GNU bash, version 3.2.51(1)-release
Merge pull request #5 from mckenfra/patch-1

Fix empty repo check for Mac OS X