Added takeWhile and some tests

Also did a little refactoring and fixed the naming of the (now) sortstreams
folder in src/scala/test.