Make the FsMagic compatible across different systems

Docker-DCO-1.1-Signed-off-by: Praneeth Bodduluri <lifeeth@resin.io> (github: lifeeth)