Add arg-sample code

@mjhubisz

This PR addresses issue #9 by merging the code needed for `arg-sample` into master.


Do you want to remove this code? Or do you want to keep it for uncommenting later?