Fixed logic bug in removing 'derv_' from filenames.