This is popular and in POSIX. Some duplicated code between readdir is also unified into some static functions.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.