Make rake task work on file or dir (#16)