basename.go: Complete functionality

Now supports all flags and features of basename.