Added t2127 - use %d as a current directory name.

There was no easy way to get the name of the directory in the Tupfile, so if you wanted to name a library based on the directory name you would have to duplicate the information in the Tupfile. Tup already has this information though, so it is easy to expose using a %-flag. Note that only the lowest level directory is reported - it is not a partial path from the tup root, and certainly not a full path. It can just be used as a handy way to name things based on the directory name in macros.
win32: Fix t5077 to not track dependencies on directories.

The fuse fs was dropping dependencies on directories, but in some cases (FindFirstFile), Windows was not doing the same. This was causing problems because some commands were getting dependencies on common directories, so any changes to Tupfile or Tuprules.tup in those directories was causing all commands to be re-executed. It is not quite as easy to ignore directories in the FindFirstFile wrapper, so instead both fuse and Windows now report directory accesses, and they are dropped in add_node_to_list() if we know the tent is a directory.
fdopendir wrapper: Close the file descriptor.

fdopendir() on Linux takes ownership of the file-descriptor, so we don't close it ourselves. In the OSX wrapper, we get the full path and call opendir() on it, but we left the file descriptor open. This would quickly cause errors as too many fds are open.
win32: Adjust spacing in progress bar so extra blank lines are not inserted.

When printing exactly 80 characters, Windows scrolls to the next line, so a '\r' doesn't go back to the beginning anymore. Just go to 1 less character instead.
win32: Add FOREGROUND_INTENSITY to colors.

The defaults are kinda hard to read (especially the blue used by running commands), and this makes it a little easier.
Added t4076 - fix 'sed -i'.

When sed is run with the -i flag, it creates a temporary file using mode 000. If create() is not implemented, then fuse tries to do mknod(file, 000); open(file), which fails because it doesn't have permissions to open the file anymore. Tup needs to implement the create call so this occurs as a single operation and sed is happy.
Return an error code of 1 instead of -1.

Some installs of MinGW treat -1 as 0, so things succeed when they shouldn't (like 'tup monitor_supported'). The actual return value doesn't really matter, so long as it is treated as an error.
Added t2128 - allow preloading other directories for readdir() in run-scripts.

Normally run-scripts can only readdir() in the current directory, since we have no idea what the state of other directories is (files may be built in them, or not). Now the preload keyword can be used to force parsing other Tupfiles that we want to look at, so tup can know the directory state when the script executes.
Added t2129 - preload should be relative to the included file.
Parser version 6: Finish preload keyword. Added t2130.

Make sure that when we preload, we load the subdirectories as well as the normal and generated files.
win32: Reset the console before quitting.

If you set a different background in the console, tup should restore to that setting when quitting. It's a bit difficult to get tup to match the settings, but this at least preserves the user's preferences.
win32: Make failed commands have red background with intensity.
Merged recent commits.  Preload omitted since run-scripts aren't supported in this fork.  Relevant tests were also updated (t2127 t4076 t5076 t5077).