The issue has been fixed in changeset 3afaaaff9287.
Concerning the additional issue: Without specifying a prefix (with --prefix=output) the default prefix as specified in the Hugin preferences is used. By default this is "%projectname", this means that the project filename inclusive path is used. So you can change the preference setting or easier specify the prefix on the command line (analog as done with pto2mk).
The issue has been fixed in changeset 3afaaaff9287.
Concerning the additional issue: Without specifying a prefix (with --prefix=output) the default prefix as specified in the Hugin preferences is used. By default this is "%projectname", this means that the project filename inclusive path is used. So you can change the preference setting or easier specify the prefix on the command line (analog as done with pto2mk).