renamed read_first_line to head and extended it to optionally read the first n lines of a file.  defaults to reading the first line