Hi,
I had a similar problem before and I think I know what the problem is,
though I didn't look in the source (I solved my problem by doing
things in my home directory and didn't have time to drill to the
bottom of the problem; however a Hugin developer might be able to
quickly find the problem).
My analysis from the time:
Hugin generates a makefile with things to do (it is called
something.pto.mk) in your project directory. If the project is outside
/tmp, then the makefile contains absolute paths to images it
references.
If the images happen to be in /tmp, then Hugin generates relative
paths, probably because Hugin creates its own temporary directory and
whatever code generates the makefile is too smart for its own good and
realizes its opportunity to generate relative paths.
So if you create a directory
/tmp/foo
and copy all the images in there, then the makefile does not refer to
/tmp/foo/image_1234.jpg but to something like ./foo/iimage_1234.jpg
(don't remember the exact way, but I remember that it was a relative
path instead of an absolute path).
However, later the execution fails because (presumably) the process'
working directory is actually not /tmp, but /tmp/foo. So the places
where it looks for the pictures are /tmp/foo/foo/image_1234.jpg ...
which is wrong.
So - whatever code generates the makefile, it should try to be less
smart about it :)