Fix error at --dir option of mix tasks