Adds materialize functions to lib/btrfs.