Revert "smb: eliminate  unused while loop in OpenDir"

This reverts commit aeebd22d2e88fd14f1b0624d0bdbc6f791a75892.

thanks to @stefansaraev for bringing this up: https://github.com/xbmc/xbmc/pull/5740#issuecomment-64438828
I can confirm that this revert fixes the issue