The command \jobname usually print the file name without the path and extension, so inside a file called foo.tex will print just foo. With pdflatex foo.test or compiling from LaTeXila certainly I obtained this result. But from Gummi what I obtain is .foo.tex  

Does anyone know why Gummi compiles differently and how I could get the usual \jobname behavior in Gummi?

Edit:
Based on helpful answers of @JosephWright and @Herbert
I wonder if it is possible to do the \jobname correction in Gummi only if the source have the .swp extensión or .tex persist in \jobname. 

That is, I would like a solution like:

\makeatletter
\let\JobName\jobname
\ifthenelse{\equal{\detokenize{foo}}{\jobname}}
{}
{
\def\@JobName.#1.#2\@nil{#1}
\def\jobname{\expandafter\@JobName\JobName\@nil}
}
\makeatother


This conditional works to check if the jobname is foo or not, but I want a general solution, independent of the file name (not limited to the string foo). 


Question: Polite alternatives to "as soon as possible"
Answer: An alternative I see in business emails is:


  As soon as you get a chance.


I like it because it implies sensitivity for the other person's schedule yet conveys the urgency of the matter.