7365d61d00
was colliding with dirname() in libc.a and causing a Sig 10/bus error. Just change dirname to savedir and be done with it.