Another sed bug. (The e2fsprogs build uses multiple line continuations on the same command.)
sed 'r' didn't work right.
Allocate space for null terminator.