common: make sure /etc/mtab is correct before mounting anything

If mtab ever gets replaced by a regular file all sorts of things break.
Merge pull request #358 from marineam/mtab

build_library: make sure /etc/mtab is correct before modifying images