Derivation of the Boltzmann equation for a dilute, quantum-mechanical, slightly inhomogeneous gas