Trying to fix issue with executing shell commands from within Ruby