I have the ultimate answer to this problem. I could restore my iPhone, which was not even detected by iTunes yesterday. When the software is being downloaded in my case through Finder, before the time is up for the DFU mode and the phone exits the DFU mode simply press the home button+power button combination followed by the home button only so the phone restarts the DFU mode. That way you can prolong the amount of time your phone stays in DFU mode and when the download is completed, you are good to go.