Raise error when initializing repository in non repo directory. Refactored thor cli class.