Improve performance and escape shell args (continued)

Expands on and closes #6.