use first dir name for bittorent tasks, and use filename for others

fixed #33