More git fixes

This improves the handling of last directory to be a bit more useful and adds another git apply option.