CLEANUP: state-file: make the path concatenation code a bit more consistent

There are as many ways to build the globalfilepathlen variable as branches
in the if/then/else, creating lots of confusion. Address the most obvious
parts, but some polishing definitely is still needed.
1 file changed