Implement basename.