Fixed package deployment per schema v2.0

validate if dir exist before performing action.