Fix Coverity warning for unchecked return value from dirname()
Fix Coverity warning for unchecked return value from dirname()

- Check return value from dirname()
- Remove static from local compose buffer

Signed-off-by: Joachim Nilsson <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>

troglobit/finit,troglobit/finit