Fix bug in wrapper.sh so dir names can have spaces