Corrected upscaleNetPorosity-method

Method upscaleNetPorosity corrected. Also check result to avoid division by zero.