Also uses fs::path quoting in bench printed strings and fixes a
misleading error message.
Originally suggested https://github.com/bitcoin/bitcoin/pull/20744#issuecomment-1022486215
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
This is a backport of core#24252