Use apply instead of calling the equivalent path function directly.

Otherwise, we end up passing an Array filled with undefined values and
get exceptions that say "Too many parameters provided for path".