realpath fails if dir doesnt exist, run it it on '.' and append bin dir