setup: split off a function to checks working dir for .git file