Add p.crate/target-flag-value for querying flags

Provides a simple function for query values set with the
set-flag-value script function.