Memoize the result of NodeList.list(). Since this requires a real root

directory to be used with BRJS, become tolerant of the invalid
directories passed in many of the legacy tests, and handle invalid
directories in a more formal way for the new code.