Add 'dir' and 'models' routines to Problems API

Makes Problems-related code a bit easier to write without dropping to
any hacks like guessing problem statement filenames
Forcibly remove empty tabs from contest info tabs

See how this online judge software lost two empty tabs using just one
weird trick (grep {$_})