Fix socket path handling, fixed style
This is a slight adaption of !2 (closed) to fix the styling issue mentioned in !2 (comment 188863103).
The changes I made based on the original MR are:
- Remove the empty parentheses in the calls to
socketpath
- Rebase the branch onto the current master