Change func and type names for consistency

Changed several function names to form ptw_[type]_[action] so that they are
consistent.  Changed type ptw_file to ptw_hdr to more accurately describe what
it contains, rather than the misleading original.