I just created this Snippet to add the hidden file attribute using the Firefox Addon SDK API. I basically read the current file attributes, check if the file is already hidden and if not set the hidden attribute while keeping the other file attributes.