I went through these countries in December 2004 - January 2005.
Back then (and as far as I know nothing has changed), it was possible to get a temporary import permit for both Mauritania and Mali. The permit for Mali is good for something like 30 days. If you enter in Nioro, for example, then the reason you might need to go to Bamako within a week or so is to buy insurance.
You can get the Malian visa in Nouakchott and it took about 10 minutes for me (Canadian).
If you don't get the Malian insurance when you get to Bamako, then be prepared to bribe a cop if you get caught. . .