Added function to properly escape a path.

This will resolve a path with spaces, ampersands, or square brackets