check for ARGV.first before testing it

Otherwise we will crash if no args are passed. Now we print the usage message
minor: lot's of small fixes to make replication work
Merge pull request #16 from azul/feature/replication

minor replication fixes