only chmod if pid file is owned by current user

I ran into the same issue that #497 was trying to fix, but I don't think
the merged solution will work. The problem is that the old pid file is
owned by the previous user(abc123 in #497) and thus, the file cannot be
removed by the new user (xyz789). A solution is to check if the current
user owns the file and only performs the chmod if that is the case.

Squashed commit of the following:

commit 80acee57966998fe0781f4a3263440e6a2c21bef
Author: Sajan Alexander <sajana@spiceworks.com>
Date:   Mon Nov 24 09:33:01 2014 -0600

    use uid, not gid

commit 1c954afdc452df57c282a19377ce13e26930d9c8
Author: Sajan Alexander <sajana@spiceworks.com>
Date:   Sun Nov 23 17:11:59 2014 -0600

    remove removal of pid file since permission error still exists

commit f5cb7a8a113d43d4ae0050fa4380c90db243b45b
Author: Sajan Alexander <sajana@spiceworks.com>
Date:   Sun Nov 23 16:47:26 2014 -0600

    make sure existing pid file is owned by the current user