Support .git files with newline at the end

Fixes #876
Fix git symlink handling
Add tests for git symlinks
Check whether it runs fine in travis
Fix error in python-3* that happens while checking branch name
Remove outdated comment
Merge pull request #905 from ZyX-I/fix-876

Fix support for .git git symlinks