added support for spaces on dir name