Do you still want 5.0.1 firmware? The latest firmware for the 3GS is 5.1.1 now. Did you try to update your iPhone through iTunes with the "Update" button when you plugged your iPhone into iTunes?
Try that first. If that doesn't work for you then continue reading.
On your desktop go to your internet browser address bar and type this in:
http://www.iclarified.com/entry/index.php?enid=750
Then go down the list until you find the firmware link that you want to download for the 3GS.
After that is complete, plug your iPhone into your computer and wait for iTunes to recognize your device. After iTunes recognizes your device, on the left side of iTunes, there will be a list of options you can pick from. Search for "DEVICES" which will have your iPhone name under it.
Click on your iPhone name.
Your information for your iPhone will pop up.
Sync your iPhone so that you will have a backup for your device.
This is IMPORTANT:
After you have synced your device, press and hold the "Shift" key on your keyboard then click on the "Restore" button.
Your windows directory should pop up. If it didn't pop up, try again.
Locate where you have saved the firmware, select it and press "Open".
Then follow what iTunes is telling you. If you have any problems, don't hesitate to contact me.