Build: configure: validate configure options for paths
Previously we expanded path variables like:
eval prefix="`eval echo ${prefix}`"
Now, define a helper function expand_path_option for this, to improve
readability and isolate the eval madness. The helper can also take the
option default to reduce code duplication.
Additionally, expand_path_option requires the expanded value to be a full
path (i.e. start with a /), to perform some validation on user-supplied values.