Difficult Scriptures. Luke 16:1-13

This is the parable of the shrewd manager,

As I see it this chap is suspected of being dishonest, so when he is called to account he fiddles the books to get a few friends on his side who will help him out when he gets sacked.
I get the point Jesus makes later on that if you are dishonest in small things you will also be dishonest in bigger things.
I also get the point that the world is much more shrewd than the kingdom when it comes to dealing with money- but I reckon that's because we try to be honest and kind in our dealings and don't lie or con people.
The bit I don't get is that Jesus commends him for being shrewd. I reckon he deserves to be blasted for his dishonesty-
Can anyone explain this one for me? I also get stuck with verse 9 I tell you, use worldly wealth to gain friends for yourselves, so that when it is gone, you will be welcomed into eternal dwellings.

Any offers on this one?