identifyFileFormat: quote arguments

The arguments were being misinterpreted in the case that `relativeLocation` contained a space.

I think it's actually a bug that directories with spaces were possible, but that's a separate issue.

Fixes #7150.