search form leads to 404

Don’t submit directly to search.php. WordPress probably will not know what to do with that. You will have the same issue submitting directly to any theme file.

WordPress should pick up on the s parameter and process the search correctly if you just leave out the action attribute like so:

<form id='searchform' method='get'>

Untested, but I am fairly confident.