Added ability to randomly sample input.

Added this to support JunkDrawer's requirement to sample file input and
determine data types.