File names refer to the directory from which you are performing the rake task, and not where the rake file is located. Indicate the absolute path, including the rail installation directory, for example:
File.open(File.join(Rails.root, "lib", "tasks", "users.txt"), "r")
There is no βcorrectβ location for afaik import data, but the lib/tasks directory should not be specified. To do this, simply create a dedicated directory under your root rail and point to it in the same way as above.
Thilo source share