I got the solution by debugging upload.py. Recently, I tried to force galaxy to run jobs in SCRATCHDIR (directory in the local disks of computer), so I put cd $SCRATCHDIR at the end of the environmental settings file. Generated tool script contains line like
python .../upload.py .../registry.xml ./files..
but before that environmental settings are applied (including cd $SCRATCHDIR). upload.py is using absolute paths except json_file = open( 'galaxy.json', 'w' ) that breaks further recognition of the uploaded file (I guess due to calling dataset = loads( line ), where loads is from json library). Removing cd command from the settings solved the problem.
Thank you for all suggestions.
Best regards, Pavel