I wrote another small plugin for PicoCMS that actually lets you load files based on the filename. I called it pico_get_by_filename.