added more support for properly removing/restoring maya app dir.
added more support for properly removing/restoring maya app dir.

cgrebeld/pymel,shrtcww/pymel,AtonLerin/pymel,david-lassonde-adsk/pymel,leonsooi/pymel,shrtcww/pymel,AtonLerin/pymel,juggernate/pymel,leonsooi/pymel,david-lassonde-adsk/pymel,assumptionsoup/pymel,juggernate/pymel,assumptionsoup/pymel