from-submodule now works with recent git submodule implementation

Starting in git 1.7.8, git submodule started storing submodule metadata
in $GIT_DIR/modules/<name>. This broke the git subtree from-submodule
command, which would fail when fetching from the moved repo.

from-submodules now checks to see if the .git file is a file (rather
than a directory), and also moves the actual git metadata into the .git
subdirectory of the moved prefix.

It's also necessary to unset core.worktree when moving the actual git
metadata.