As I write this I have realised how old the post is, however the fix below is valid under Leopard and Snow Leopard and has on many occasions resolved this issue.
Either login as Admin or using Remote Desktop send these commands to the Mac that will not shut down correctly.
sudo rm -f...