Handle shell operations with spaces and quotes

Fixed: Running a shell command that has an argument with spaces and is
inside quotes would fail.