Build constructs a filesystem hierarchy given a layout.
The layouts keys should be ToSlash-style file paths. Its values should be the content that is written at those paths. Intermediate directories will be automatically created.
To create a directory, end its path with a "/". In this case, the content will be ignored.
MustWithTempDir calls WithTempDir and panics if any failures occur.
WithTempDir creates a temporary directory and passes it to fn. After fn exits, the directory is cleaned up.