[Fix] Ensure that replacements are also applied to command line

Environment variables and the command itself could contain e.g. absolute paths.
This was a regression introduced in 0.6.0.