fixing compilePreview url parsing to properly escape path, closes #564