gets method to get line.

Windows and posix (mac) have been tested