Refactored the working tree dependant code for add.
Adding to a bare repository is now possible because @git_working_dir
is only used on the relevant methods.