Added unittest for lvm.py

Now a basic unittest for utils.py
is available under tests/test_utils.py.
While writing unittest some code was modified
to facilitate the testing.

Change-Id: I1b5f315dbae85f6dac88e3c43bfa1b0c8764c632
LAUNCHPAD: https://blueprints.launchpad.net/freezer/+spec/unittest-lvm