Wave-optics treatment of x-rays passing through tapered capillary guides