fixed working directory logic for bootstrapping