inspect: Fix a bug in the *BSD root detection

The assumption that Linux will map the MBR partition to /dev/sda1
and the BSD 'a' partition to /dev/sda5 is not always correct.

Signed-off-by: Nikos Skalkotos <skalkoto@grnet.gr>
lib: Add COMPILE_REGEXP macro to hide regexp constructors/destructors.