My form action url is being prepended with a directory that does not exists

You should not be using a relative URL. I’ve written a number of answers about this already Relative URLs are relative to the page you are on as the browser sees it. With pretty permalinks turned on that is almost always going to work out badly. This problem/mistake is so common that I guessed the answer just by looking at your title.

Second, you should not be submitting to a stand-alone theme file like that. Use the AJAX API (even if it isn’t actually an AJAX request). It is very, very simple:

function my_ajax_wpse_213294() {
  // your upload code

  exit();
}
add_action('wp_ajax_my_ajax', 'my_ajax_wpse_213294'); // logged in only
add_action('wp_ajax_nopriv_my_ajax', 'my_ajax_wpse_213294');

Submit to /wp-admin/admin-ajax.php which can be created with admin_url('/admin-ajax.php'); with the ?action=my_ajax URL parameter.