Fix composer.json and remove the unneeded chdir hack