Fix bug path to basename command is different from some system