Fix GetMasterDir, GetInputDir

These functions were not returning anything on env override, so
I returned some static var (given that override is used for testing).