reimplementing movepath into Cscanner, to support better timeouts and filtering