improvement: only remove suid/sgid if necessary

Added a check that makes sure that we are actually operating on a file and that this file has either SUID or SGID bits set. Only then will they be removed.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>