Fixes #33 --  rmate is unable to handle directories
updated version