some reorg
based on devel.rb
if filename is a dir
open file under cursor
separated creation of textaction