Fix bug which process hanged up when directory is given as compiled file

It happends when files under a directory is given with wild card and target_dir includes one or more directories

    $ ts-yield -o /build/dir/ ./target_dir/*