Factor out filename calculation to file format class (issue #480)

Signed-off-by: Michal Čihař <michal@cihar.com>
Fixed filename calculation for Android resources (fixes #480)

Signed-off-by: Michal Čihař <michal@cihar.com>