updated rake tasks and added a finalize method to move and delete processed emails