Checkout a different branch first, before deleting it:
git checkout master
git branch -d MyMods
Also, branches have nothing to do with folders. Git always tracks the whole repository at once, with all its folders and files. A branch is nothing else than a pointer to a single commit, or snapshot, in the history of the repository.