Added support for dmg image installation

Also added corresponding test cases

Also added class variable validation