Extended FilesystemState context manager.

FilesystemState now replaces directories that are removed in-context.