Fix #882 - API get() fails for path containing space

This resolves #882 and is based on the 1.6 branch