improve workingArea defination, fix issue #4100 and #4099
Merge pull request #4118 from qunox/improveDirectory

improve workingArea defination, fix issue #4100 and #4099