Sort os.listdir result before comparing to list in test

- test_make_linkdir_include_multiple_exclude
Fix util.unbuffered_stream to not loop forever