fix for BSD's expr - $i needs to be initialized

BSD's expr has a stricter syntax requirements.
Unitialized $i in the patch download loop were resulting in the omission of any patches.
Added initialization of $i right before entering the loop.