fix file.recurse state bug

* fix bug: file.recurse state shoud treat source as dir
* 2 cents optimization: evaluate srcpath one time