filter non-directory versions
handle directory when getting source file Fix #876
check file existence before lstat, fix https://github.com/spmjs/spm/commit/99001c471593b6bca114a74b52e71ba001a18c81