small change to assert sorted
add in-memory version of LineFile with the same interface