Fix IoT.js fs.scandir
Fix IoT.js fs.scandir

Incorrectly located error handling code (introduced by #744) is fixed.
(The allocation error check should be after the allocation.)

heejin-kim/TizenRT,chanijjani/TizenRT,junmin-kim/TizenRT,Samsung/TizenRT,junmin-kim/TizenRT,Parkjihooni6186/TizenRT,jeongarmy/TizenRT,JeonginKim/TizenRT,jeongarmy/TizenRT,sunghan-chang/TizenRT,lokeshbv/TizenRT,jeongchanKim/TizenRT,jeongchanKim/TizenRT,chanijjani/TizenRT,btheosam/TizenRT,davidfather/TizenRT,Samsung/TizenRT,an4967/TizenRT,pillip8282/TizenRT,Samsung/TizenRT,Parkjihooni6186/TizenRT,JeonginKim/TizenRT,chanijjani/TizenRT,HONGCHAEHEE/TizenRT,JeonginKim/TizenRT,btheosam/TizenRT,JeonginKim/TizenRT,jsdosa/TizenRT,lokeshbv/TizenRT,jeongarmy/TizenRT,shivgarg/TizenRT,pillip8282/TizenRT,btheosam/TizenRT,jeongarmy/TizenRT,btheosam/TizenRT,an4967/TizenRT,junmin-kim/TizenRT,junmin-kim/TizenRT,pillip8282/TizenRT,Parkjihooni6186/TizenRT,jsdosa/TizenRT,sunghan-chang/TizenRT,JeongJunSik/TizenRT,junmin-kim/TizenRT,HONGCHAEHEE/TizenRT,JeonginKim/TizenRT,Parkjihooni6186/TizenRT,Samsung/TizenRT,chanijjani/TizenRT,lokeshbv/TizenRT,davidfather/TizenRT,an4967/TizenRT,sunghan-chang/TizenRT,an4967/TizenRT,shivgarg/TizenRT,JeongJunSik/TizenRT,jeongchanKim/TizenRT,davidfather/TizenRT,pillip8282/TizenRT,shivgarg/TizenRT,jeongarmy/TizenRT,shivgarg/TizenRT,heejin-kim/TizenRT,Samsung/TizenRT,davidfather/TizenRT,an4967/TizenRT,heejin-kim/TizenRT,sunghan-chang/TizenRT,jsdosa/TizenRT,davidfather/TizenRT,jsdosa/TizenRT,JeongJunSik/TizenRT,an4967/TizenRT,pillip8282/TizenRT,chanijjani/TizenRT,JeongJunSik/TizenRT,HONGCHAEHEE/TizenRT,junmin-kim/TizenRT,HONGCHAEHEE/TizenRT,JeongJunSik/TizenRT,HONGCHAEHEE/TizenRT,an4967/TizenRT,jeongchanKim/TizenRT,heejin-kim/TizenRT,shivgarg/TizenRT,jeongarmy/TizenRT,junmin-kim/TizenRT,heejin-kim/TizenRT,btheosam/TizenRT,shivgarg/TizenRT,sunghan-chang/TizenRT,HONGCHAEHEE/TizenRT,lokeshbv/TizenRT,chanijjani/TizenRT,sunghan-chang/TizenRT,Samsung/TizenRT,Parkjihooni6186/TizenRT,Samsung/TizenRT,lokeshbv/TizenRT,jsdosa/TizenRT,chanijjani/TizenRT,jeongchanKim/TizenRT,jeongchanKim/TizenRT,pillip8282/TizenRT,pillip8282/TizenRT,davidfather/TizenRT,davidfather/TizenRT,Parkjihooni6186/TizenRT,sunghan-chang/TizenRT,jsdosa/TizenRT,lokeshbv/TizenRT,btheosam/TizenRT,heejin-kim/TizenRT,JeonginKim/TizenRT,jeongchanKim/TizenRT,jsdosa/TizenRT,jeongarmy/TizenRT,JeongJunSik/TizenRT