When directory to change to is None, set it to empty string else will expand as None.