Index out of range if directory not provided to webdav backend



Please describe what you are doing to trigger the bug:
/Applications/ -d init test webdav://

Please describe what you expect to happen (but doesn’t):
Successful initialization in the root folder of the yandex disk or the error message.

Please describe what actually happens (the wrong behaviour):

$ /Applications/  -d init test webdav://
Reading the environment variable DUPLICACY_WEBDAV_PASSWORD
Enter the WebDAV password:password
runtime error: index out of range
goroutine 1 [running]:
runtime/debug.Stack(0x22, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
	/Users/chgang/zincbox/go/src/ +0x189
panic(0x4848840, 0x4e99c50)
	/usr/local/go/src/runtime/panic.go:502 +0x229, 0x11, 0x0, 0x7ffeefbff915, 0xb, 0xc4200cc590, 0xe, 0x0, 0x0, 0x0, ...)
	/Users/chgang/zincbox/go/src/ +0x633, 0x7, 0x7ffeefbff907, 0x4, 0x0, 0x0, 0x7ffeefbff90c, 0x26, 0x0, 0x0, ...)
	/Users/chgang/zincbox/go/src/ +0x3c51
main.configRepository(0xc4200e50e0, 0xc4200e5001)
	/Users/chgang/zincbox/go/src/ +0x5b9
	/Users/chgang/zincbox/go/src/ +0x30, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4990c36, 0x4f, 0x0, ...)
	/Users/chgang/zincbox/go/src/ +0x7ea*App).Run(0xc4201ab7a0, 0xc4200d60f0, 0x5, 0x5, 0x0, 0x0)
	/Users/chgang/zincbox/go/src/ +0x864
	/Users/chgang/zincbox/go/src/ +0x57ab