Index on deploy.
Use getopts not getopt in list.

getopt was failing and was not what I intended. I should use getopts.
Fix test for duplicate name in new.
Correct two bugs in new.

I introduced a bug with my previous 'fix' where it would never add. I removed
the -c in the grep so now the test matches what grep is doing. I also used
mgr-index directly, since I can't just call mgr index. Not clear why.