Remove buggy cd function

Maybe I'll try fixing it later.
Fix broken file existence test