maybe i should of mention you should always plug your device into the computers usb before you put it into dfu, pwned dfu and restore.
its hard work getting out of the recovery loop, you definatly need to get your phone into dfu mode(
heres a thread about it). but its not so easy from the recovery loop. I found that when i was stuck in the recovery loop i had to time everything to the second. so i used this online stop watch
here
what i did is when i was at the picture of the usb lead pointing to itunes i started the stopwatch and then made sure my device is plugged in via usb.
Then hold the power button until the pictrure disappears and then straight away without releasing the power button start holding the home button aswell and time this for exactly ten second and as soon as you hit the ten second mark without releasing the home button realease the power button and continue to hold the home button for exactly 15 seconds and then release it on the 15 second mark.
its hard from recovery loop but the main part is the home and power for ten seconds and then just the home for 15 seconds. just keep trying because you have to get into dfu mode if the picture pops up in the middle of the sequence you've miss timed it. you'll know when your there because your phone will look like its off but if you hold the power button it will do nothing! so thats how to get into dfu mode
!
Now are you sure you've created a 5.0.1 ispw with the 5.0.1 shsh blobs stitched to it? if you have then you should go to redsn0w and select pwned dfu mode again and if you are already in dfu mode like i said you need to be previosly it should put your phone straight into pwned dfu without taking you through the steps to get into dfu mode first.
if you click on pwned dfu and it starts taking you through those dfu timers then it will error and say your phone is in recovery mode and this is because you have not put your phone into dfu mode correctly previously so go back and get into dfu mode and then once redsn0w allows you to put the phone into pwned dfu you are ready to open itunes and shift+click restore and select your custom ispw you've created earlier.
sorry if this doesn't help i don't know how else to explain it and it works fine for me everytime now i know how to do it
(i've done it a few times following tese exact same steps now!)