fix chdir for bootstrap when used as hook