add -- to terminate basename option (in case -bash starts with -)