[perl #115112] avoid repeated calls to path_is_absolute() and rename it

A micro-optimization inspired by bulk88's perl #115112.

The original proposal suggested applying a two changes that removed the
duplicate calls, and then explicitly inlined path_is_absolute().

This version removes the duplicate calls, renames the function to better
match it's purpose and asks the compiler to inline it.