Using comint-dynamic-complete-filename

.. which seems to be available also in emacs 23.2 (although reports as
to whether it works are mixed), and has better behaviour anyways.